<template>
  <div class="appointBook-content">
          <div class="appointBookBox">
                <div class="headerBox">
                      <div class="line"></div>
                      <div class="title">查看任命书</div>
                </div>
                <el-table :data="infoList" border>
                  <el-table-column label="名称" align="center" prop="personnelName" />
                  <el-table-column label="身份证" align="center" prop="identityNumber" />   
                  <el-table-column label="类型" align="center" prop="personnelType" /> 
                  <el-table-column label="联系号码" align="center" prop="phonenumber" /> 
                </el-table>
                <div class="headerBox" style="margin-top:40px">
                      <div class="line"></div>
                      <div class="title">任命书</div>
                </div>
                  <el-image class="image" :src="appointBookData.appointmentImgUrl" :preview-src-list="[appointBookData.appointmentImgUrl]" fit="cover"></el-image>
      
               <div class="footer-btn">
                      <el-button class="btn" @click="goBackBtn">返回</el-button>
               </div>
          </div>

  </div>
</template>

<script>
  import {getAppointBook} from "@/api/zhangping/occupational";
  export default {
    data() {
      return {
         dataList1:[{time:'现场快速检测',case:'33'}],
         appointBookData:{},
         infoList:[]
      };
    },
    created() {
       this.getAppointBookFn() 
    },
    methods: {
        getAppointBookFn(){
              let data = {
                  id:this.$route.query.id          
              }
              getAppointBook(data).then(res=>{
                  if(res.code == 200){
                        this.appointBookData = res.data
                        this.infoList = [res.data]
                  }else{
                        this.$message.error(res.msg);  
                  }    
            })
        },

        goBackBtn(){
          this.$router.back()
        },
    }
  };
</script>
<style lang="scss" scoped>
         .display-fx-center{
             display: flex;
             align-items: center;
         }
          .soildTop{
             border-top:solid 1px  #dfe6ec;
         }

         .appointBook-content{
              overflow-y: auto;
              position: relative;
              background-color: #fff;
              padding: 40px 20px;
              border-radius: 10px;
              height: calc( 100vh - 66px - 128px);
              // display: flex;
              // flex-direction: column;
             .appointBookBox{
                    max-width: 930px;
                    margin: 0 auto;
                    padding-bottom:40px;

              }
           .headerBox{
                font-size: 16px;
                color: #484848;
                font-weight: bold;
                // margin-top:40px;
                margin-bottom:15px;
                @extend .display-fx-center;
                .line{
                  width: 4px;
                  height: 12px;
                  background: #5D85FF;
                  border-radius: 6px 6px 6px 6px;
                  margin-right:6px;
                }
             }
             .image{
                width: 463px;
                height: 230px;
             }
          }
          .footer-btn{
                 width: 100%;
                 background: #FFFFFF;
                 height: 78px;
                 position: fixed;
                 bottom: 0;
                 right: 0;
                .btn{
                   position: fixed;
                   bottom: 20px;
                   right: 20px;    
                }
                 
          }
        ::v-deep{
            .el-table__header-wrapper th{
                 background: #F4F8FF!important;    
           }
          //  鼠标移入表格行不变色
          .el-table .el-table__row:hover td {
            background-color: transparent !important;
          }
        }
</style>
